display('--------------- loading DATA ----------------------')
filename = 'omesom26_20091023T234450_oTiToMiM.data'; %data generada con omasel26 (normalizacion x fila x^2)
TrainingSetSOM = som_read_data(filename); 

n=30;
e=100;
SOMtrmt = som_lininit(TrainingSetSOM,'msize',[n n],'rect');

SOMtrmt = som_batchtrain(SOMtrmt, TrainingSetSOM, 'trainlen', e); 
save (['../data/som' num2str(30) 'x' num2str(30) '_' num2str(100) 'e.mat'],'SOMtrmt');
bmus= som_bmus(SOMtrmt,TrainingSetSOM);
som_show(SOMtrmt)
hits=som_hits(SOMtrmt, TrainingSetSOM);
% remove 'tr'/'mt' column from training data
TrainingSetSOM.labels(:,2)=[];
% som_trmt map contains only tr&mt "cluster" of neurons
som_trmt=som_autolabel(SOMtrmt,TrainingSetSOM); 

som_show(SOMtrmt, 'empty',...
         ['omeSOM - ' int2str(n) 'x' int2str(n)]);
som_show_add('labels', som_trmt, 'Markercolor', 'r', 'TextSize', 8)
%cbred  = [0.5 0.5 0.5];
%som_show_add('hit',hits,'markercolor',cbred); 
